/**
 * Created by Administrator on 2018/7/16 0016.
 */
/*
 * 消息
 * */
var helper = require('../../../utils/helper.js');

Page({
    /* ------------------------------
     初始数据
     ------------------------------ */
    data: {},

    /* 页面加载*/
    onLoad: function(opts){
        helper.navTitle("消息");

    },
    /* ------------------------------
     下拉刷新
     ------------------------------ */
    onPullDownRefresh: function(){

        // 查询最近订单
        this.querySummary();
    },

    /* ------------------------------
     处理 nextUrl
     ------------------------------ */
    handleNextUrl: function(){

        var
            m = /\bnextUrl=([^&]+)/ig.exec( helper.pageArg('myCenter') || '' ),
            nextUrl = m ? m[1] : null;

        if (!nextUrl)
            return;

        if ('myCode' == nextUrl){
            this.redirectMyCode();
            return;
        }

        if ('orderAll' == nextUrl){
            this.handleOrderClick();
            return;
        }

        if ('couponAll' == nextUrl){
            this.handleCouponClick();
            return;
        }

        if ('addressAll' == nextUrl){
            this.handleAddressClick();
            return;
        }

    },

    //     跳转提现记录
    handleWithdraw:function (){
        helper.navigateTo('','')
    }

    //     跳转收支明细

    //     跳转退换货消息

});